package main

import (
	"github.com/astaxie/beego/logs"
)

var (
	BConfig *Config = new(Config)
)

func registerTemplate() error {
	if err := BuildTemplate(BConfig.WebConfig.ViewsPath); err != nil {
		if BConfig.RunMode == DEV {
			logs.Warn(err)
		}
		return err
	}
	return nil
}

func main() {
	BConfig.WebConfig.ViewsPath = "views"
	BConfig.RunMode = DEV
	registerTemplate()
}
